{include file="common/header.tpl"}
    <div id="vfriendContainer">   
        <div id="mainContent3C">
            <div class="vfriendContainer3C">            
                <div class="vfriendContent3C">
                    <div class="leftCol">
                        {vfriend_navi id=$AppUI->id}                        
                    </div>
                    <div class="rightCol">
                    	<div class="midCol">
                        	<div class="boxEdit">
                            	<div class="headerTitle"><h3>Chỉnh sửa nội dung Offline</h3></div>
                                <div class="editItem">
                                	<form method="post" id="frmEdit" name="frmEdit" enctype="multipart/form-data" action="{$smarty.const.HOST_VFRIEND}offline/saveedit" autocomplete="off">
                                    	<input type="hidden" name="pofflineid" id="pofflineid" value="{$row.offlineid}" />
                                    	<input type="hidden" name="psrcid" id="psrcid" value="{if isset($smarty.session.sOfflineParam)}{$smarty.session.sOfflineParam.psrcid}{else}{$row.srcid}{/if}" />
                                        <div class="editItems">
                                            <h4><strong>Chủ đề Offline</strong></h4>
                                            {if isset($smarty.session.sOfflineError) && $smarty.session.sOfflineError != ""}
                                             	<div class="userInput">
                                                    <span class="errorMessage">{$smarty.session.sOfflineError}</span>
                                                </div>
                                            {/if}
                                            <div class="userInput">
                                                <label for="ptitle">Tiêu đề <span class="symbolRequire">*</span>:</label>
                                                <input type="text" class="text" id="ptitle" name="ptitle" value="{if isset($smarty.session.sOfflineParam)}{$smarty.session.sOfflineParam.ptitle|escape}{else}{$row.title|escape}{/if}" tabindex="1" maxlength="255" />
                                            </div>
                                            <div class="userInput">
                                                <div class="half">
                                                    <label for="pcategoryid">Hình thức <span class="symbolRequire">*</span>:</label>
                                                    <div class="category">
                                                        <select name="pcategoryid" id="pcategoryid" class="select" tabindex="2">
                                                            <option value="0">Chọn</option>
                                                            {if $arrCateOffline}
                                                            	{foreach item=item from=$arrCateOffline}
                                                                	<option value="{$item.categoryid}" {if isset($smarty.session.sOfflineParam) && $smarty.session.sOfflineParam.pcategoryid == $item.categoryid}selected="selected"{elseif $row.categoryid==$item.categoryid}selected="selected"{/if}>{$item.name}</option>
                                                                {/foreach}
                                                            {/if}
                                                        </select>
                                                    </div>
                                                </div>
                                                <div class="half">
                                                    <label for="pquantity">Số lượng:</label>
                                                    <input type="text" id="pquantity" name="pquantity" value="{if isset($smarty.session.sOfflineParam)}{$smarty.session.sOfflineParam.pquantity}{else}{$row.quantity}{/if}" class="text half" tabindex="3" onkeypress="javascript: return isNumberKey(event);" maxlength="3" />
                                                </div>
                                            </div>
                                            <div class="userInput">
                                                <div class="half">
                                                    <label><a href="javascript:;" style="display:block;margin-left:21px;" class="tipsy" title="Định dạng ngày hẹn: DD/MM/YYYY<br/><br/>Bạn nhớ lưu ý năm nhuần."><img src="{$smarty.const.HOST_STATICS}img/icon/tips.png" alt="{$smarty.const.DOMAIN}: Hướng dẫn chọn ngày hẹn." border="0" width="13" /></a>&nbsp;Ngày hẹn:</label>
                                                    <input type="text" id="pexpired" name="pexpired" value="{if isset($smarty.session.sOfflineParam)}{$smarty.session.sOfflineParam.pexpired}{else}{$row.expired|date_format:"%d/%m/%Y"}{/if}" class="text half"  tabindex="4" maxlength="10" onblur="javascript:{literal}if(this.value != '') {checkDate(this.value);}{/literal}"/>
                                                </div>
                                                <div class="half">
                                                    <label for="phours"><a href="javascript:;" style="display:block;margin-left:30px;" class="tipsy" title="Định dạng giờ hẹn HH:MM<br/><br/>Múi giờ sử dụng là 24h."><img src="{$smarty.const.HOST_STATICS}img/icon/tips.png" alt="{$smarty.const.DOMAIN}: Hướng dẫn nhập giờ hẹn." border="0" width="13" /></a>&nbsp;Giờ hẹn:</label>
                                                    <input id="phours" name="phours" value="{if isset($smarty.session.sOfflineParam)}{$smarty.session.sOfflineParam.phours}{else}{$row.expired|date_format:"%H"}{/if}" onkeypress="javascript: return isNumberKey(event);" type="text" class="text third" tabindex="5" maxlength="2" />
                                                    <label for="pminutes" class="third">:</label>
                                                    <input type="text" id="pminutes" onkeypress="javascript: return isNumberKey(event);" name="pminutes" value="{if isset($smarty.session.sOfflineParam)}{$smarty.session.sOfflineParam.pminutes}{else}{$row.expired|date_format:"%M"}{/if}" class="text third" tabindex="6" maxlength="2" />
                                                </div>
                                            </div>
                                        </div>
                                        <div class="editItems">
                                            <h4><strong>Địa điểm Off</strong></h4>
                                            <div class="userInput">
                                                <div class="half">
                                                    <label for="pprovince">Tỉnh/thành <span class="symbolRequire">*</span>:</label>
                                                    <div class="province">
                                                    	<select id="pprovince" name="pprovince" class="select" tabindex="7" onchange="javascript:district(this.value,'pdistrict')">
                                                        	<option value="0">Chọn</option>
                                                            {html_options options=$arrProvince selected=$intProvinceId}
                                                        </select>
                                                    </div>
                                                </div>
                                                <div class="half">
                                                    <label for="pdistrict">Quận/huyện <span class="symbolRequire">*</span>:</label>
                                                    <div class="district">
                                                    	<select id="pdistrict" name="pdistrict" class="select" tabindex="8">
                                                        	<option value="0">Chọn</option>
                                                            {if isset($smarty.session.sOfflineParam) && $arrDistrict}
                                                            	{html_options options=$arrDistrict selected=$smarty.session.sOfflineParam.pdistrict}
                                                           	{else}
                                                            	{html_options options=$arrDistrict selected=$row.district}
                                                            {/if}
                                                        </select>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="userInput">
                                                <label for="paddress">Địa điểm <span class="symbolRequire">*</span>:</label>
                                                <input type="text" class="text" id="paddress" name="paddress" tabindex="9" value="{if isset($smarty.session.sOfflineParam)}{$smarty.session.sOfflineParam.paddress|escape}{else}{$row.addr|escape}{/if}" maxlength="255" onkeyup="javascript:lookup(this.value);" onblur="javascript:hideLookup();"/>                    
                                                <div class="suggestionsBox" id="suggestions" style="display: none;">
                                                    <div class="suggestionList" id="autoSuggestionsList">&nbsp;</div>
                                                </div>
                                            </div>
                                            <div class="userInput" id="fulladdr" style="display:none;">
                                            	<label>Địa chỉ:</label>
                                                <span id="addr" style="line-height:24px;">&nbsp;</span>
                                            </div>
                                        </div>
                                        <div class="editItems">
                                            <h4><strong>Thông tin liên lạc</strong></h4>
                                            <div class="userInput">
                                            	<label for="pmobile"><a href="javascript:;" style="display:block;margin-left:10px;" class="tipsy" title="Chỉ những thành viên được duyệt mới nhìn thấy thông tin liên lạc của bạn."><img src="{$smarty.const.HOST_STATICS}img/icon/tips.png" alt="{$smarty.const.DOMAIN}: Hướng dẫn nhập giờ hẹn." border="0" width="13" /></a>Điện thoại <span class="symbolRequire">*</span>:</label>
                                                <input type="text" class="text half" name="pmobile" id="pmobile" value="{if isset($smarty.session.sOfflineParam)}{$smarty.session.sOfflineParam.pmobile|escape}{else}{$row.mobile|escape}{/if}" maxlength="20" />
                                            </div>
                                            <div class="userInput">
                                            	<div class="half">
                                                	<label>Skype:</label>
                                                    <input type="text" class="text half" name="pskype" id="pskype" value="{if isset($smarty.session.sOfflineParam)}{$smarty.session.sOfflineParam.pskype|escape}{else}{$row.skype|escape}{/if}" />
                                                </div>
                                            	<div class="half">
                                                	<label>Yahoo ID:</label>
                                                    <input type="text" class="text half" name="pyahoo" id="pyahoo" value="{if isset($smarty.session.sOfflineParam)}{$smarty.session.sOfflineParam.pyahoo|escape}{$row.yahoo|escape}{/if}" />
                                                </div>
                                                
                                            </div>
                                        </div>
                                        <div class="editItems">
                                            <h4><strong>Nội dung</strong></h4>
                                            <div class="userInput content">
                                                <textarea cols="0" rows="0" tabindex="10" id="pcontent" name="pcontent">{if isset($smarty.session.sOfflineParam)}{$smarty.session.sOfflineParam.pcontent}{else}{$row.content}{/if}</textarea>
                                            </div>
                                            <div class="userInput">
                                            	<input type="submit" value="Lưu chỉnh sửa" tabindex="11" class="btnSubmit" />
                                            </div>
                                        </div>
                                	</form>
                                </div>
                            </div>
                      	</div>
                        <div class="extCol">
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
{include file="common/footer.tpl"}